
<div id="content">
	<div id="title"><h1><?php echo $title; ?></h1></div>

	<div id = "wrap-table">
		<?php
		 $attributes = array('id' => 'frmAds');

		if(empty($row->advertisementsid)){
			echo form_open_multipart('admin/advertisements/save',$attributes);
		}
		else{
			echo form_open_multipart('admin/advertisements/update/'.$this->uri->segment(4),$attributes);
		}
		?>
	<table border="1" class="admin-tableform">
		
		<table border="1" class="admin-tableform">
			<tbody>
				<?php if(!empty($row->banner)) :?>
				<tr>
					<td colspan = "2"><img src = "<?php echo base_url().'assets/images'.$row->banner; ?>" /></td>
				</tr>
				<?php endif; ?>
				<tr>
					<td class='key'>Banner</td><td><input type="file" name="banner" id = "banner_pic" size="20" value = "" class="<?php echo ($action=='add') ? 'required' : null;?>"/></td>
				</tr>
				<tr>
					<td>Name</td><td><input type="text" name="name" value="<?php echo @$row->name; ?>" class="required"/></td>
				</tr>
				<tr>
					<td>Section</td><td>
					<?php $this->load->helper('Select_helper');
					echo section('section', '', @$row->section); ?>
					</td>
				</tr>
				<tr>
					<td>Publish</td>
					<td>
					<?php
						echo Boolean_helper::yesno('status', @$row->status); 
					?>
					</td>
				</tr>
				<tr>
					<td colspan = "2">
					<input id = "ads_submit" type ="submit" name ="" value = "Save" />
					<a href="<?php echo base_url();?>admin/advertisements/">
					<input id = "ads_clear" type = "button" name = "" value = "Cancel" style="width:70px;cursor:pointer;"/>
					</a>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
	<input type="hidden" value="<?php echo $action;?>"  id="form_action"/>
	</form>
</div>